package com.hhit.collaborative_learning.learning;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONObject;

import com.hhit.collaborative_learning.dao.impl.PublicDaoImplMySql;
import com.hhit.collaborative_learning.entity.Blog;

public class EditBlogServlet extends HttpServlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String blogId=request.getParameter("blogId");
//		System.out.println(blogId);
		PublicDaoImplMySql dao=new PublicDaoImplMySql();
		String json=dao.getBlog(Integer.parseInt(blogId));
//		System.out.println(json);
		response.getWriter().print(json);
	}
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
	}

}
